# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=jql
pkgver=4.0.5
pkgrel=0
pkgdesc="A JSON Query Language CLI tool"
url="https://github.com/yamafaktory/jql"
arch="aarch64 armhf armv7 ppc64le x86 x86_64"  # blocked by rust/cargo
license="MIT"
makedepends="cargo"
source="https://github.com/yamafaktory/jql/archive/v$pkgver/jql-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/jql -t "$pkgdir"/usr/bin/
}

sha512sums="
bc65604aae32a93cf0b7531ca21bc85ee802c35c4cfb3743c773ef4e87f6fb2183232d469ff9a341a1c1fa19aebb1128803713924935c1a086f0ef573f8c1065  jql-4.0.5.tar.gz
"
